REM Find Program Files Prefix
SET ProgramFilesPrefix=%ProgramFiles%
IF NOT "%ProgramFiles(x86)%"=="" SET ProgramFilesPrefix=%ProgramFiles(x86)%
CALL "%ProgramFilesPrefix%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86

REM Do Make
mkdir build-windows-release
cd build-windows-release
cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_PROGRAM_PATH="%ProgramFilesPrefix%\GnuWin32\bin" -DCMAKE_INSTALL_PREFIX=.
nmake
REM nmake install
pause
